package com.jdbctemplate.base;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * 使用了xml的配置
 */
public class DemoXMl {
    public static void main(String[] args) {
        //1获取容器对象
        ApplicationContext ac=new ClassPathXmlApplicationContext("jdbctem.xml");
        //2获取对象
       JdbcTemplate jt= ac.getBean("jdbcTemplate",JdbcTemplate.class);
        jt.execute("insert into account(name,money)values ('ccc',1000)");

    }
}
